/**
 * 功能描述
 */
define(function (require, exports, module) {
	var Grid = require("grid");
	
    var instance = {
        initComponent: function (params, widget) {
        	var damagesConsumpDetailGrid = new Grid({
        	    parentNode: ".J-consumpdetailgrid",
        	    autoRender: false,
        	    model: {
        	    	head: {
						title: "物品赔偿"
					},
        	        columns: [{
        	            name: "goods.name",
        	            label: "物品名称"
        	        }, {
        	            name: "price",
        	            label: "单价"
        	        }, {
        	            name: "num",
        	            label: "数量"
        	        }, {
        	            name: "sum",
        	            label: "总金额",
        	            format: function(value, row){
        	            	return parseFloat(row.price*row.num).toFixed(2);
        	            }
        	        }, {
        	            name: "description",
        	            label: "备注",
        	        }]
        	    }
        	});
        	widget.set("damagesConsumpDetailGrid",damagesConsumpDetailGrid);
        }
    };
    module.exports = instance;
});
